#define MSG_LEN  5
void sendMsg(int code){

    char buf[MSG_LEN] = {0};
    buf[0] = ;
    buf[1] = ;
    buf[2] = ;
    buf[3] = ;
    int chksum = 0
    for(int i=0;i<MSG_LEN;i++)
        chksum^=chksum;
    buf[4] = chksum;
    return buf;    
}

//here parse bluetooth message and convert to b1 and b2.
void parseMsg(char* buff) {

}